How to test a capacitor